
class ShenXianBase:

    def fight(self):
        print("神仙始祖们在天地边界打架...")


class ShenXian(ShenXianBase):
    """神仙类"""
    def fly(self):
        print("神仙都会飞...")

    def fight(self):
        print("神仙在打架...")


class MonkeyBase:

    def fight(self):
        print("猿猴在打架...")


class Monkey(MonkeyBase):

    def eat_peach(self):
        print("猴子都喜欢吃桃子...")

    # def fight(self):
    #     print("猴子在打架...")



class MonkeyKing(Monkey,ShenXian):

    def play_golden_stick(self):
        print("孙悟空玩金箍棒...")

m = MonkeyKing()
m.play_golden_stick()
m.fly()
m.eat_peach()

m.fight() # 方法名 冲突时 按继承顺序从左到右继承 深度优先 先找近层 实际上是广度优先（在树从上至下时）